<?php
/*
 * Copyright 2013 by Jerrick Hoang, Ivy Xing, Sam Roberts, James Cook, 
 * Johnny Coster, Judy Yang, Jackson Moniaga, Oliver Radwan, 
 * Maxwell Palmer, Nolan McNair, Taylor Talmage, and Allen Tucker. 
 * This program is part of RMH Homebase, which is free software.  It comes with 
 * absolutely no warranty. You can redistribute and/or modify it under the terms 
 * of the GNU General Public License as published by the Free Software Foundation
 * (see <http://www.gnu.org/licenses/ for more information).
 * 
 * @edited for forestdale Don Barclay 3/7/14
 */

//$shift = new Shift("joe2334545","101514","joe-10-15-14",13,30,18,0,"thursday","joe","notes");

include_once(dirname(__FILE__) . '/../domain/Shift.php');
include_once('checkRoutines.inc');

echo "testing dbShift";
testShiftModule();
echo "test complete";

      function testShiftModule() {
         $testShift = new Shift('cln1','04-29-14', 'testscriptshift','12:30','17:30','tue','04-29-14-12:30-17:30-cln1' , "Isolation Precaution",TRUE);
         checkEquals($testShift->get_name(), "testscriptshift");
         checkEquals($testShift->get_id(), "04-29-14-12:30-17:30-cln1");
         
// Test new function for resetting shift's start/end time
	//	 checkEquals($testShift->set_start_end_time(15,17));
	//	 checkEquals($testShift->get_id(), "03-28-08-15-17");
	//	 checkEquals($testShift->get_name() == "15-17");
            //     checkEquals($testShift->get_clinID() == 12345);
		 
// Be sure that invalid times are caught.
	//	 checkEquals($testShift->set_start_end_time(13,12));
	//	 checkEquals($testShift->get_id() == "03-28-08-15-17");
	//	 checkEquals($testShift->get_name() == "15-17");

         checkEquals($testShift->get_day(),"tue");
	

         $testShift->set_notes("Hello 3-5 shift!");
         checkEquals($testShift->get_notes(),"Hello 3-5 shift!");
 		 echo ("testShift successful");
  	  }
